package cn.edu.hust.sse.software7.class3.entities;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * This is the entities used to store user informations. The can register to be
 * a user of the eBusiness and manage our personal informations, such as change
 * user information, look up personal information.
 * 
 * @author mason
 * 
 */

@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class EBUser implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long userId;
	@Persistent
	private String userName;
	@Persistent
	private String password;
	@Persistent
	private Date birth;
	@Persistent
	private String email;
	@Persistent
	private String cellPhone;

	public EBUser(String userName, String password) {
		super();
		this.userName = userName;
		this.password = password;
	}

	public EBUser(String userName, String password, String email,
			String cellPhone) {
		super();
		this.userName = userName;
		this.password = password;
		this.email = email;
		this.cellPhone = cellPhone;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Date getBirth() {
		return birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getCellPhone() {
		return cellPhone;
	}

	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	public Long getUserId() {
		return userId;
	}

	
}
